package com.userrequestdtos;

import java.util.Hashtable;

import org.ksoap2.serialization.KvmSerializable;
import org.ksoap2.serialization.PropertyInfo;

public class FileInfoStoringDTO implements KvmSerializable{

	// declaring variables

	public String v_useremail;
	public String v_filetype;
	public String v_filename;
	public String v_categoryname;
	public String v_title;
	public String v_content;

	// default constructor

	public FileInfoStoringDTO()
	{
		// complusory	
	}
   public FileInfoStoringDTO(String uname,String ftype,String fname,String cname,String title,String content)
    {
    	v_useremail=uname;
    	v_filetype=ftype;
    	v_filename=fname;
    	v_categoryname=cname;
    	v_title=title;
    	v_content=content; 
    }
	@Override
	public Object getProperty(int index) {
		// TODO Auto-generated method stub
		switch (index) {
		case 0:

			return v_useremail;
		case 1:

			return v_filetype;
		case 2:

			return v_filename;
		case 3:

			return v_categoryname;
		case 4:

			return v_title;
		case 5:

			return v_content;

		default:
			break;
		}
		return null;
	}

	@Override
	public int getPropertyCount() {
		// TODO Auto-generated method stub
		return 6;
	}

	@Override
	public void getPropertyInfo(int index, Hashtable arg1, PropertyInfo info) {
		// TODO Auto-generated method stub
		switch (index) {
		case 0:
			info.type=PropertyInfo.STRING_CLASS;
			info.name="v_useremail";
			break; 
		case 1:
			info.type=PropertyInfo.STRING_CLASS;
			info.name="v_filetype";
			break;
		case 2:
			info.type=PropertyInfo.STRING_CLASS;
			info.name="v_filename";
			break;
		case 3:
			info.type=PropertyInfo.STRING_CLASS;
			info.name="v_categoryname";
			break;
		case 4:
			info.type=PropertyInfo.STRING_CLASS;
			info.name="v_title";
			break;
		case 5:
			info.type=PropertyInfo.STRING_CLASS;
			info.name="v_content";
			break;

		default:
			break;
		}
	}

	@Override
	public void setProperty(int index, Object value) {
		// TODO Auto-generated method stub
		switch (index) {
		case 0:
			v_useremail=value.toString();
			break;
		case 1:
			v_filetype=value.toString();
			break;
		case 2:
			v_filename=value.toString();
			break;
		case 3:
			v_categoryname=value.toString();
			break;
		case 4:
			v_title=value.toString();
			break;
		case 5:
			v_content=value.toString();
			break;

		default:
			break;
		}
	}

}
